package com.hrm.action;

import com.hrm.action.annotation.Action;
import com.hrm.action.annotation.RequestPath;
import com.hrm.dto.Envelope;
import com.hrm.service.DepartmentService;

/**
 * Create by zekdot on 20-3-10.
 */
@Action
@RequestPath(path = "/department")
public class DepartmentAction {

    private DepartmentService departmentService;

    public DepartmentAction(){
        departmentService = new DepartmentService();
    }
    @RequestPath(path = "/all")
    public Envelope allDepartment(){
        return departmentService.getAllDep();
    }

    @RequestPath(path = "/pos")
    public Envelope allPosByDep(String dep){
        return departmentService.getPosByDep(dep);
    }
}
